package LinesCraft;

public class Items {
	Player player = new Player();
	
	String name;
	int uses;
	int amount;	//Plan: if you have 10 pickaxes you won't have 10 pickaxe objects, just when it's durability(uses) reaches 0, it's ammount
					//will be decreased by 1 and its uses will go back to max. awesome huh? or stupid and overcomplicated? comment!
	boolean block=false;
	int slot;	//for equipables
	
	boolean food=false;
	int heal;	//for foods, obviously...  and potions, but that's the problem of the future..(yes there will be potions(if everything goes the way I want))
	
	//It kinda sucks how many items(Items objects) don't use even half of their variables, but if I do everything OK it won't be a problem.
	
	boolean inChest; 	// this solution is quite pathetic, so this is the first reason the remake the game from the begining.
	
	public Items(int material, String name){	//material 1=wood 2=stone 3=iron, 4=diamond - nope, no golden crap
		this.name=name;
		if(material==1){
			this.uses=60;
		}else if(material==2){
			this.uses=132;
		}else if(material==3){
			this.uses=251;
		}else if(material==4){
			this.uses=1562;
		}else if(material==0){	// bows
			this.uses=400;
		}
	}
	
	public Items(String name, int dur, int slot){	//for armor and bow
		this.name=name;
		this.uses=dur;
		this.slot=slot;
	}
	
	public Items(String name){	//blocks
		this.name=name;
	}

	public Items(String name, int health){	//foods heal. and potions. but those are problem of the future.
		this.food=true;
		this.heal=health;
	}
	
	public String toString(){	// needed for listing inventory
		return this.name;
	}
}
